package tq.com.tqteacher.adapt;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;

import tq.com.tqteacher.fragment.TQDirectoryFragment;
import tq.com.tqteacher.fragment.TQFragment;
import tq.com.tqteacher.fragment.TQHomePublishFragment;
import tq.com.tqteacher.inter.INewPulibshListener;
import tq.com.tqteacher.message.fragment.TQMessageFragment;
import tq.com.tqteacher.mine.fragment.TQMineFragment;
import tq.com.tqteacher.optimize.fragment.FragmentOptimize;

public class TQLaunchMainAdapter extends FragmentPagerAdapter {
    private ArrayList<Fragment> fragments = new ArrayList<>();

    public TQLaunchMainAdapter(FragmentManager fragmentManager, INewPulibshListener pPulibshListener){
        super(fragmentManager);
        fragments.add(TQHomePublishFragment.newInstance(pPulibshListener));
        fragments.add(FragmentOptimize.newInstanc(pPulibshListener));
        fragments.add(TQMessageFragment.instance());
        fragments.add(new TQDirectoryFragment());
        fragments.add(TQMineFragment.newInstance());
    }
    public Fragment getItem(int var1){
        return fragments.get(var1);
    }
    public int getCount(){
        return fragments.size();
    }

}
